package factories

import (
	"gitee.com/sweetsunnyflower/carpooling-server-go/app/models/track"

	"github.com/bxcodec/faker/v3"
	"github.com/spf13/cast"
)

func MakeTracks(count int) []track.Track {

	var objs []track.Track

	// 设置唯一性，如 Track 模型的某个字段需要唯一，即可取消注释
	faker.SetGenerateUniqueValues(true)

	for i := 0; i < count; i++ {
		trackModel := track.Track{
			FromId: cast.ToUint64(i + 1),
			ToId:   cast.ToUint64(i + 2),
		}
		objs = append(objs, trackModel)
	}

	return objs
}
